package com.zl.tby.vo;

import com.zl.tby.core.base.util.ToolsUtil;
import com.zl.tby.model.TbyCarRecord;
import lombok.Data;

/**
 * @author changpeng
 * @version 1.0
 * @since 2024/9/19 20:31
 */
@Data
public class TbyCarRecordForm extends TbyCarRecord {
    private String capDateFormat;

    public TbyCarRecordForm() {

    }

    public TbyCarRecordForm(TbyCarRecord entity) {
        this.setId(entity.getId());
        this.setDeviceCode(entity.getDeviceCode());
        this.setDeviceName(entity.getDeviceName());
        this.setCarNum(entity.getCarNum());
        this.setCarSpeed(entity.getCarSpeed());
        this.setCarType(entity.getCarType());
        this.setCarTypeStr(entity.getCarTypeStr());
        this.setCarDirect(entity.getCarDirect());
        this.setCapDate(entity.getCapDate());
        this.setCarImgUrl(entity.getCarImgUrl());
        this.setLon(entity.getLon());
        this.setLat(entity.getLat());
        //this.setCapDateFormat(ToolsUtil.dateUtil2String(entity.getCapDate(), "yyyy-MM-dd HH:mm:ss") + " " + ToolsUtil.getWeekODateChinese(entity.getCapDate()));
        this.setCapDateFormat(ToolsUtil.dateUtil2String(entity.getCapDate(), "yyyy/MM/dd HH:mm:ss"));
    }
}
